from sqlalchemy.orm import Session
import json
from typing import List
from app.entity import ActivityApply
from app.schema import DeptData
from utils.request import PageInfo
from utils.tree import TreeUtil

class ActivityApplyModel:

    @classmethod
    def insert(cls, db: Session, data: DeptData):
        db_post = ActivityApply(**data)
        db.add(db_post)
        db.commit()
        return True
 